package com.sofa.api;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("permission-service")
public interface PermissionService {

    @PostMapping("/rpc/permission/bindDefaultRole")
    void bindDefaultRole(@RequestParam("userId") Long userId);

    @GetMapping("/rpc/permission/getUserRoleCode")
    String getUserRoleCode(@RequestParam("userId") Long userId);

    @PostMapping("/rpc/permission/upgradeToAdmin")
    void upgradeToAdmin(@RequestParam("userId") Long userId);

    @PostMapping("/rpc/permission/downgradeToUser")
    void downgradeToUser(@RequestParam("userId") Long userId);
} 